#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QPushButton>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QDebug>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->setStatusTip("待输入数据:");

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::initInterFace()
{

}


void MainWindow::on_start_btn_clicked()
{

}

void MainWindow::on_lineEdit_textChanged(const QString &arg1)
{
    QGraphicsScene *scene=new QGraphicsScene();
    for(int i=0;i<10;i++)
    {
      QPen pen(Qt::red);
      pen.setWidth(1);
      int j=10;
      scene->addRect(QRect(j*i,j,40,40),pen);
      scene->addEllipse(20,30,30,30);

    }
    ui->graphicsView->setScene(scene);
    QString temp=arg1;
    temp.remove(QRegExp(","));

    qDebug().noquote()<<temp;
}

